2000 |
How can I change the visual appearance of the filter bar's close button (solid)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/); exg2antt1.Background(1/*exFooterFilterBarButton*/,WinApi::RGB2int(255,0,0)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1999 |
Is it possible to prevent definitely showing the filter bar's close button
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/); exg2antt1.Background(1/*exFooterFilterBarButton*/,-1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1998 |
Is it possible to show the close button only if there is a filter applied
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptVisible(513/*exFilterBarShowCloseIfRequired | exFilterBarPromptVisible*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1997 |
The control's filter bar is not closed once I click the close button (toggle)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); com_Items.LockedItemCount(2/*exBottom*/,1); h = com_Items.LockedItem(2/*exBottom*/,0); com_Items.ItemDivider(h,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"<c><fgcolor=808080>Press the CTRL + F to turn on/off the control's filter bar. ALT + Up/Down moves the focus."); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); exg2antt1.FilterBarCaption("`<r><fgcolor=808080>` + value"); exg2antt1.FilterBarPromptPattern("B"); exg2antt1.FilterBarPromptVisible(2323/*exFilterBarCompact | exFilterBarToggle | exFilterBarSingleLine | exFilterBarVisible | exFilterBarPromptVisible*/); var_Column1 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1; com_Column1.FilterType(240/*exFilter*/); com_Column1.Filter("Item B"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1996 |
How can I display the control's filter on a single line
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarCaption("len(value) ? `filter for: <fgcolor 808080>` + value : `<fgcolor 808080>no filter`"); exg2antt1.FilterBarPromptVisible(18/*exFilterBarSingleLine | exFilterBarVisible*/); var_Column1 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1; com_Column1.FilterType(240/*exFilter*/); com_Column1.Filter("Item A|Item B"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1995 |
How can I display the control's filter on a single line (prompt-combined)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarCaption("`<r>` + value"); exg2antt1.FilterBarPromptVisible(2067/*exFilterBarCompact | exFilterBarSingleLine | exFilterBarVisible | exFilterBarPromptVisible*/); var_Column1 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1; com_Column1.FilterType(240/*exFilter*/); com_Column1.Filter("Item A|Item B"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1994 |
How can I get the number of results after a filter is applied
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } // Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void onEvent_Click() { ; exg2antt1.ClearFilter(); } // FilterChange event - Occurs when the filter was changed. void onEvent_FilterChange() { ; print( "Items.MatchItemCount" ); print( exg2antt1.Items().MatchItemCount() ); print( exg2antt1.FormatABC("value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",exg2antt1.Items().MatchItemCount()) ); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/); exg2antt1.FilterBarPromptPattern("Item"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1993 |
How can I programmatically clear the control's filter
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } // Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void onEvent_Click() { ; exg2antt1.ClearFilter(); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/); exg2antt1.FilterBarPromptPattern("B"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1992 |
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt-combined)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptPattern("B"); exg2antt1.FilterBarPromptVisible(3/*exFilterBarVisible | exFilterBarPromptVisible*/); var_Column1 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1; com_Column1.FilterType(240/*exFilter*/); com_Column1.Filter("Item B"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1991 |
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/); exg2antt1.FilterBarPromptPattern("B"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1990 |
Is it possible to prevent closing the control's filter bar, so it is always shown
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().AddBar(_Item,"Task",COMVariant::createFromDate(str2Date("12/4/2017",213)),COMVariant::createFromDate(str2Date("12/14/2017",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/2/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); COM::createFromVariant(exg2antt1.Columns().Add("Item")).DisplayFilterButton(true); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.AllowSort(false); com_Column.Width(32); com_Column.FormatColumn("1 apos ``"); com_Column.Position(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.FilterBarCaption("len(value) = 0 ? `<fgcolor=808080>no filter` : value"); exg2antt1.FilterBarPromptVisible(2/*exFilterBarVisible*/); var_Column1 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1; com_Column1.FilterType(240/*exFilter*/); com_Column1.Filter("Item B"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1989 |
What are the options to align the percent caption
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Clip"); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowResizeChart(6/*exAllowResizeChartMiddle | exAllowResizeChartHeader*/); com_Chart.DrawGridLines(-2/*exRowLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/26/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task%Progress"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Pattern(32/*exPatternBox*/); com_Bar.Color(WinApi::RGB2int(164,164,164)); com_Bar.StartColor(WinApi::RGB2int(240,240,240)); com_Bar.EndColor(com_Bar.StartColor()); com_Bar.OverlaidType(4611/*exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.Height(15); com_Bar.Def(12/*exBarPercent*/,COMVariant::createFromReal(0.5)); com_Bar.Def(14/*exBarShowPercentCaption*/,COMVariant::createFromBoolean(true)); com_Bar.Def(13/*exBarPercentCaptionFormat*/,"<sha ;;0>%p%"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("no clip, (0-2)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(2)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(1)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.ItemBar(h,"K3",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(0)); h = com_Items.AddItem("clip, inside (3-5)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(5)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(4)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.ItemBar(h,"K3",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(3)); h = com_Items.AddItem("hide on min width, clip if not fit, inside (6-8)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(8)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(7)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.ItemBar(h,"K3",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(6)); h = com_Items.AddItem("hide if not fit, no clip, inside (9-11)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(11)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(10)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.ItemBar(h,"K3",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(9)); h = com_Items.AddItem("no clip, inside, outside (12-14)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(14)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(13)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.ItemBar(h,"K3",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(12)); h = com_Items.AddItem("no clip, outside (16-18)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(17)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3"); com_Items.ItemBar(h,"K3",15/*exBarAlignPercentCaption*/,COMVariant::createFromInt(16)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1988 |
Is it possible to determine whether a bar is in the current display area
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; exg2antt1.Refresh(); } // DateChange event - Occurs when the first visible date is changed. void onEvent_DateChange() { ; exg2antt1.Refresh(); } // FormatColumn event - Fired when a cell requires to format its caption. void onEvent_FormatColumn(int _Item,int _ColIndex,COMVariant /*variant*/ _Value) { COMVariant e,l,r,s; ; s = exg2antt1.Items().ItemBar(_Item,"A",1/*exBarStart*/); e = exg2antt1.Items().ItemBar(_Item,"A",2/*exBarEnd*/); l = exg2antt1.FormatABC("A < B",e,exg2antt1.Chart().FirstVisibleDate()); r = exg2antt1.FormatABC("A > B",s,exg2antt1.Chart().DateFromPoint(1,-1)); _Value = exg2antt1.FormatABC("( A or B ) ? `<fgcolor=C0C0C0>hidden` : `<b>visible`",l,r); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Chart,com_Column,com_Items; anytype var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Visible")); com_Column = var_Column; com_Column.FireFormatColumn(true); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.OverviewVisible(-1/*exOverviewShowAll*/); com_Chart.OverviewHeight(64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.SelForeColor(exg2antt1.ForeColor()); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2018",213)),COMVariant::createFromDate(str2Date("8/10/2018",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2019",213)),COMVariant::createFromDate(str2Date("8/12/2019",213)),"A"); com_Items.SelectItem(com_Items.FocusItem(),true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1987 |
How can I ensure that the bar fits the control's client area
// SelectionChanged event - Fired after a new item has been selected. void onEvent_SelectionChanged() { COMVariant k,s; int h; ; h = exg2antt1.Items().FocusItem(); k = exg2antt1.Items().FirstItemBar(h); s = exg2antt1.FormatABC("(A+B)/2",exg2antt1.Items().ItemBar(h,k,1/*exBarStart*/),exg2antt1.Items().ItemBar(h,k,2/*exBarEnd*/)); exg2antt1.Chart().ScrollTo(s,COMVariant::createFromInt(1)); } public void init() { COM com_Chart,com_Items; COMVariant k,s; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2018",213)),COMVariant::createFromDate(str2Date("8/10/2018",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2019",213)),COMVariant::createFromDate(str2Date("8/12/2019",213))); com_Items.SelectItem(com_Items.FocusItem(),true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1986 |
Is it possible to change the caption from a column without to remove the column and add it with the new caption
public void init() { ; super(); COM::createFromVariant(exg2antt1.Columns().Add("ColumnName")).Caption("NewName"); COM::createFromVariant(exg2antt1.Columns().Add("ColumnName")).HTMLCaption("<b>New</b>Name"); } |
1985 |
How can I display the bar's duration in days, minutes, and so so on
public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Columns,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Columns,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Tasks")).AllowSizing(false); var_Column = COM::createFromVariant(com_Columns.Add("Duration")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); com_Column.Def(19/*exCellValueToItemBarKey*/,"A"); var_s = "trim((1:=int((0:=value)/365) ? =:1 + ` year(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*365)))/31) ? =:1 + ` month(s) ` : ``) + (1:=in"; var_s = var_s + "t((0:=(=:0 - (=:1*31)))/7) ? =:1 + ` week(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*7)))/1) ? =:1 + ` day(s) ` : ``) + (1:=int((0:=(="; var_s = var_s + ":0 - =:1 + 1/24/60/60/2))*24) ? =:1 + ` hour(s) ` : ``) + (1:=int((0:=(=:0*24 - =:1))*60) ? =:1 + ` min(s) ` : ``) + (1:=int((0:"; var_s = var_s + "=(=:0*60 - =:1))*60) ? =:1 + ` sec(s)` : ``))"; com_Column.FormatColumn(var_s); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/30/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Chart.OverviewVisible(-1/*exOverviewShowAll*/); com_Chart.OverviewHeight(64); com_Chart.ResizeUnitScale(16777216/*exSecond*/); com_Chart.AllowResizeChart(262/*exAllowChangeUnitScale | exAllowResizeChartMiddle | exAllowResizeChartHeader*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/31/2001",213)),COMVariant::createFromDate(str2Date("1/7/2002",213)),"A"); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/1/2002",213)),COMVariant::createFromDate(str2Date("2/14/2002",213)),"A"); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromUtcDateTime(str2Datetime("1/2/2002 10:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/2/2002 12:00:00",213)),"A"); h = com_Items.AddItem("Task 4"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/4/2002 8:30:30",213)),"A"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1984 |
How can I change the background color for checked items (EBN color, frame)
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; exg2antt1.Refresh(); } public void init() { COM com_Appearance,com_Bar,com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Appearance,var_Bar,var_Chart,var_Column,var_ConditionalFormat,var_Items; int h,hChild; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.DefaultItemHeight(22); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEcx"; var_s = var_s + "9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJcF"; var_s = var_s + "qXFSLVxNBKAQEBA="; com_Appearance.Add(2,COMVariant::createFromStr(var_s)); com_Appearance.Add(1,"CP:2 1 1 -1 -1"); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0 = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(0x1000000); com_ConditionalFormat.ChartBackColor(com_ConditionalFormat.BackColor()); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1983 |
How can I change the caption of the checked items (sample 2)
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.SelForeColor(exg2antt1.ForeColor()); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("%CS0 = 1 ? `<bgcolor=000000><fgcolor=FFFFFF> ` + value + ` </fgcolor></bgcolor>` : value"); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1982 |
How can I change the caption of the checked items (sample 1)
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1981 |
How can I change the font for the checked items
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; exg2antt1.Refresh(); } public void init() { COM com_Bar,com_Chart,com_Column,com_ConditionalFormat,com_Items,com_f; anytype f,var_Bar,var_Chart,var_Column,var_ConditionalFormat,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.DefaultItemHeight(22); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0 = 1"); com_ConditionalFormat = var_ConditionalFormat; f = COM::createFromObject(new stdole.StdFont()); com_f = f; f.Name(exg2antt1.Font().Name()); f.Size(12); com_ConditionalFormat.Font(f); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1980 |
How can I bold the checked items
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; exg2antt1.Refresh(); } public void init() { COM com_Bar,com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Bar,var_Chart,var_Column,var_ConditionalFormat,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0 = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1979 |
How can I change the foreground color for checked items
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; exg2antt1.Refresh(); } public void init() { COM com_Bar,com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Bar,var_Chart,var_Column,var_ConditionalFormat,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.SelBackMode(1/*exTransparent*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0 = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.ForeColor(WinApi::RGB2int(255,128,128)); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1978 |
How can I change the background color for checked items (solid color)
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; exg2antt1.Refresh(); } public void init() { COM com_Bar,com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Bar,var_Chart,var_Column,var_ConditionalFormat,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.SelBackMode(1/*exTransparent*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0 = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(255,128,128)); com_ConditionalFormat.ChartBackColor(com_ConditionalFormat.BackColor()); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1977 |
How can I change the color for checked Task bars
public void init() { COM com_Bar,com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Bar,var_Chart,var_Column,var_ConditionalFormat,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0 = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.ApplyToBars("Task,Summary"); com_ConditionalFormat.BarColor(WinApi::RGB2int(255,0,0)); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1976 |
I have defined "NonWorkingHours" for the Gantt, and the "exBarWorkingCount" properly excludes these hours as long as the Gantt is using "exDay" or "exHour" as the level unit. However when displaying a quarter or a year, I'm changing the unit to "exWeek", but then the "NonWorkingHours" are no longer excluded from the bars "exBarWorkingCount" and displays the wrong value
public void init() { COM com_Bar,com_Bars,com_Chart,com_Chart1,com_Column,com_Columns,com_Items,com_Level; anytype var_Bar,var_Bars,var_Chart,var_Chart1,var_Column,var_Columns,var_Items,var_Level; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Tasks")).AllowSizing(false); var_Column = COM::createFromVariant(com_Columns.Add("Working")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); com_Column.Def(19/*exCellValueToItemBarKey*/,"A"); var_s = "((1:=int(0:=( 24*int(value) + (value - int(value) + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1"; var_s = var_s + ":=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"; com_Column.FormatColumn(var_s); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowResizeChart(262/*exAllowChangeUnitScale | exAllowResizeChartMiddle | exAllowResizeChartHeader*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/3/2002",213))); com_Chart.LevelCount(2); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.Label("<%ddd%>"); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.Label("<%hh%>"); com_Chart.NonworkingHours(16761855); com_Chart.ShowNonworkingUnits(false); com_Chart.ShowNonworkingUnits(false); com_Chart.OverviewVisible(-1/*exOverviewShowAll*/); com_Chart.OverviewHeight(64); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2002",213)),COMVariant::createFromDate(str2Date("1/8/2002",213)),"A"); com_Items.ItemBar(h,"A",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/4/2002",213)),"A"); com_Items.ItemBar(h,"A",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); var_Chart1 = exg2antt1.Chart(); com_Chart1 = var_Chart1; com_Chart1.UnitScale(4096/*exDay*/); com_Chart1.ScrollTo(com_Chart1.FirstVisibleDate(),COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1975 |
Is it possible to customize the editor selection colour of the built in text editor, from standard blue to black
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.SelBackColor(WinApi::RGB2int(0,0,0)); exg2antt1.SelForeColor(WinApi::RGB2int(255,255,255)); exg2antt1.Chart().PaneWidth(true,0); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor; com_Editor.EditType(8/*MaskType*/); com_Editor.Mask(";;;rich"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); com_Items.AddItem("Just a text"); com_Items.AddItem(""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1974 |
Is it possible to customize the editor selection colour of the built in dropdown editor, from standard blue to black
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackColor(WinApi::RGB2int(0,0,0)); exg2antt1.SelForeColor(WinApi::RGB2int(255,255,255)); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("DropDown")).Editor(); com_Editor = var_Editor; com_Editor.AddItem(1,"This is just the first item"); com_Editor.AddItem(2,"This is just the second item"); com_Editor.AddItem(3,"This is just the third item"); com_Editor.EditType(2/*DropDownType*/); com_Editor.Mask(";;;rich"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); com_Items.AddItem("Just a text"); com_Items.AddItem(""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1973 |
When I display the chart in the daily view, the histogram shows correctly the data while if the chart displays the data in weekly or monthly view, the histogram shows no data or incorrectly. What can be the problem
// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. void onEvent_OverviewZoom() { ; exg2antt1.Chart().ResizeUnitScale(4096/*exDay*/); } public void init() { COM com_Bar,com_Chart,com_Column,com_Editor,com_Items; anytype var_Bar,var_Chart,var_Column,var_Editor,var_Items; int h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Effort")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(21)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.OverviewZoomCaption("|||<img>3</img>Month|Third|<img>2</img>Week|<img>1</img>Day|||"); com_Chart.Label(0/*exYear*/,""); com_Chart.Label(1/*exHalfYear*/,""); com_Chart.Label(2/*exQuarterYear*/,""); com_Chart.Label(17/*exThirdMonth*/,""); com_Chart.Label(65536/*exHour*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.OverviewZoomUnit(64); com_Chart.LevelCount(2); com_Chart.NonworkingDays(0); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(128); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.OverviewVisible(-1/*exOverviewShowAll*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramCriticalValue(3); com_Bar.HistogramItems(-7); com_Bar.HistogramGridLinesColor(WinApi::RGB2int(192,192,192)); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/23/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(4)); h1 = com_Items.AddItem("Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/24/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(3)); h1 = com_Items.AddItem("Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(2)); h1 = com_Items.AddItem("Task 4"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/30/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1972 |
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void onEvent_BeforeExpandItem(int _Item,COMVariant /*variant*/ _Cancel) { ; print( "BeforeExpandItem" ); print( _Item ); print( "ColumnFromPoint" ); print( exg2antt1.ColumnFromPoint(-1,-1) ); print( "ColumnFromPoint return -1, if the user clicks the +/- glitch, else it returns the index of the column where the click occurs." ); exg2antt1.Items().InsertItem(_Item,,"new child"); } public void init() { COM com_Columns,com_Items; anytype var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("Items")).DisplayFilterButton(true); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemHasChildren(com_Items.InsertItem(,,"Group 1"),true); com_Items.ItemHasChildren(com_Items.InsertItem(,,"Group 2"),true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1971 |
How do I change the drop down filter icon/button (black)
public void init() { COM com_Appearance,com_Chart,com_Column,com_Items; anytype var_Appearance,var_Chart,var_Column,var_Items; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQg"; var_s = var_s + "mPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThd"; var_s = var_s + "r4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); exg2antt1.Background(32/*exCursorHoverColumn*/,-1); exg2antt1.Background(0/*exHeaderFilterBarButton*/,0x1000000); exg2antt1.Background(26/*exBackColorFilter*/,WinApi::RGB2int(0,0,1)); exg2antt1.Background(27/*exForeColorFilter*/,WinApi::RGB2int(255,255,255)); exg2antt1.Description(25/*exFilterBarExclude*/,"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>"); exg2antt1.HeaderAppearance(0/*None2*/); exg2antt1.BackColorHeader(WinApi::RGB2int(0,0,0)); exg2antt1.ForeColorHeader(WinApi::RGB2int(255,255,255)); exg2antt1.HeaderVisible(true); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Filter")); com_Column = var_Column; com_Column.FilterList(8448/*exShowExclude | exShowCheckBox*/); com_Column.DisplayFilterButton(true); com_Column.AllowSort(false); com_Column.AllowDragging(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); com_Chart.LevelCount(2); com_Chart.BackColorLevelHeader(exg2antt1.BackColorHeader()); com_Chart.ForeColorLevelHeader(exg2antt1.ForeColorHeader()); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("One"); com_Items.AddItem("Two"); com_Items.AddItem("Three"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1970 |
How do I change the z-order of the bars (percent)
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,6/*exBarToolTip*/) ); } public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; COMVariant b; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h1,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.DefaultItemHeight(52); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("10/10/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.NonworkingDays(0); com_Chart.MarkTodayColor(com_Chart.BackColor()); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task%Progress"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Copy("Task","T1"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); com_Bar.Def(3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Def(12/*exBarPercent*/,COMVariant::createFromReal(0.25)); com_Bar.Def(39/*exBarPercentColor*/,com_Bar.Color()); com_Bar.Def(18/*exBarOffset*/,COMVariant::createFromInt(10)); com_Bar.Def(14/*exBarShowPercentCaption*/,COMVariant::createFromBoolean(true)); com_Bar.Def(13/*exBarPercentCaptionFormat*/,"<font ;6><b>%p%</b>"); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","T2"); com_Bar1 = var_Bar1; com_Bar1.Height(26); com_Bar1.Def(3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>"); com_Bar1.Def(5/*exBarVAlignCaption*/,COMVariant::createFromInt(16)); com_Bar1.Def(12/*exBarPercent*/,COMVariant::createFromReal(0.25)); com_Bar1.Def(39/*exBarPercentColor*/,com_Bar1.Color()); com_Bar1.Def(14/*exBarShowPercentCaption*/,COMVariant::createFromBoolean(true)); com_Bar1.Def(13/*exBarPercentCaptionFormat*/,"<font ;6><b>%p%</b>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task"); com_Items.AddBar(h1,"T1",COMVariant::createFromDate(str2Date("10/15/2017",213)),COMVariant::createFromDate(str2Date("10/25/2017",213)),"2"); com_Items.ItemBar(h1,"2",17/*exBarData*/,"Bar A"); com_Items.ItemBar(h1,"2",6/*exBarToolTip*/,"Bar A <b>Over</b> Bar B"); com_Items.AddBar(h1,"T2",COMVariant::createFromDate(str2Date("10/18/2017",213)),COMVariant::createFromDate(str2Date("10/22/2017",213)),"1"); com_Items.ItemBar(h1,"1",17/*exBarData*/,"Bar B"); com_Items.ItemBar(h1,"1",6/*exBarToolTip*/,"Bar B <b>Under</b> Bar A"); h1 = com_Items.AddItem("Task"); com_Items.AddBar(h1,"T1",COMVariant::createFromDate(str2Date("10/15/2017",213)),COMVariant::createFromDate(str2Date("10/25/2017",213)),"1"); com_Items.ItemBar(h1,"1",17/*exBarData*/,"Bar A"); com_Items.ItemBar(h1,"1",6/*exBarToolTip*/,"Bar A <b>Under</b> Bar B"); com_Items.AddBar(h1,"T2",COMVariant::createFromDate(str2Date("10/18/2017",213)),COMVariant::createFromDate(str2Date("10/22/2017",213)),"2"); com_Items.ItemBar(h1,"2",17/*exBarData*/,"Bar B"); com_Items.ItemBar(h1,"2",6/*exBarToolTip*/,"Bar B <b>Over</b> Bar A"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1969 |
How do I change the z-order of the bars
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { COMVariant b; int i; ; b = exg2antt1.Chart().BarFromPoint(-1,-1); i = exg2antt1.ItemFromPoint(-1,-1,c,hit); print( exg2antt1.Items().ItemBar(i,b,6/*exBarToolTip*/) ); } public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; COMVariant b; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h1,i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.DefaultItemHeight(52); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("10/10/2017",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.NonworkingDays(0); com_Chart.MarkTodayColor(com_Chart.BackColor()); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Copy("Task","T1"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); com_Bar.Def(3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","T2"); com_Bar1 = var_Bar1; com_Bar1.Height(25); com_Bar1.Def(3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>"); com_Bar1.Def(5/*exBarVAlignCaption*/,COMVariant::createFromInt(16)); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task"); com_Items.AddBar(h1,"T1",COMVariant::createFromDate(str2Date("10/15/2017",213)),COMVariant::createFromDate(str2Date("10/25/2017",213)),"2"); com_Items.ItemBar(h1,"2",17/*exBarData*/,"Bar A"); com_Items.ItemBar(h1,"2",6/*exBarToolTip*/,"Bar A <b>Over</b> Bar B"); com_Items.AddBar(h1,"T2",COMVariant::createFromDate(str2Date("10/18/2017",213)),COMVariant::createFromDate(str2Date("10/22/2017",213)),"1"); com_Items.ItemBar(h1,"1",17/*exBarData*/,"Bar B"); com_Items.ItemBar(h1,"1",6/*exBarToolTip*/,"Bar B <b>Under</b> Bar A"); h1 = com_Items.AddItem("Task"); com_Items.AddBar(h1,"T1",COMVariant::createFromDate(str2Date("10/15/2017",213)),COMVariant::createFromDate(str2Date("10/25/2017",213)),"1"); com_Items.ItemBar(h1,"1",17/*exBarData*/,"Bar A"); com_Items.ItemBar(h1,"1",6/*exBarToolTip*/,"Bar A <b>Under</b> Bar B"); com_Items.AddBar(h1,"T2",COMVariant::createFromDate(str2Date("10/18/2017",213)),COMVariant::createFromDate(str2Date("10/22/2017",213)),"2"); com_Items.ItemBar(h1,"2",17/*exBarData*/,"Bar B"); com_Items.ItemBar(h1,"2",6/*exBarToolTip*/,"Bar B <b>Over</b> Bar A"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1968 |
How do I get the duration/working count of the bar (sample 6,excrd)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Column1,com_Column2,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Column1,var_Column2,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(48); exg2antt1.ShowFocusRect(false); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); exg2antt1.DrawGridLines(-1/*exAllLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(1/*exHLines*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/26/2001",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Def(6/*exBarToolTip*/,"<%=%263%>"); com_Bar.Def(18/*exBarOffset*/,COMVariant::createFromInt(-12)); com_Chart.ColumnsFormatLevel("1,2/3"); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Duration")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); com_Column.FormatColumn("value + `d`"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Working")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); com_Column1.FormatColumn("value + `w`"); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Working-Period")); com_Column2 = var_Column2; com_Column2.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(263)); com_Column2.Visible(false); com_Column2.Alignment(1/*CenterAlignment*/); com_Column2.FormatColumn("((value replace `\\r\\n` with `,`) replace `#` with ``) replace ` ` with ``"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/11/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/15/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("12/31/2001",213)),COMVariant::createFromDate(str2Date("1/13/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1967 |
How do I get the duration/working count of the bar (sample 5)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemMaxHeight(_Item,64); } public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Column1,com_Column2,com_Column3,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Column1,var_Column2,var_Column3,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Def(6/*exBarToolTip*/,"<%=%263%>"); com_Chart.ColumnsFormatLevel("1,2"); com_Chart.SelBackColor(exg2antt1.SelBackColor()); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Task")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.Width(48); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Duration")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); com_Column1.Visible(false); com_Column1.Alignment(0/*LeftAlignment*/); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Working")); com_Column2 = var_Column2; com_Column2.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); com_Column2.Visible(false); com_Column2.Alignment(2/*RightAlignment*/); var_Column3 = COM::createFromVariant(exg2antt1.Columns().Add("Working-Period")); com_Column3 = var_Column3; com_Column3.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(263)); com_Column3.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/12/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/15/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2002",213)),COMVariant::createFromDate(str2Date("1/16/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1966 |
How do I get the duration/working count of the bar (sample 4)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Column,com_Column1,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/26/2001",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Chart.ColumnsFormatLevel("1,2"); COM::createFromVariant(exg2antt1.Columns().Add("Task")).Width(48); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Duration")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); com_Column.FormatColumn("value + `d`"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Working")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); com_Column1.FormatColumn("value + `w`"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/12/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/15/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1965 |
How do I get the duration/working count of the bar (sample 3)
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; print( com_Items.CellCaption(_Item,COMVariant::createFromInt(0)) ); print( "Working" ); print( com_Items.ItemBar(_Item,_Key,258/*exBarWorkingCount*/) ); print( com_Items.CellCaption(_Item,COMVariant::createFromInt(0)) ); print( "Duration" ); print( com_Items.ItemBar(_Item,_Key,513/*exBarDuration*/) ); } public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/26/2001",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); COM::createFromVariant(exg2antt1.Columns().Add("Task")).Width(48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/12/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/15/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1964 |
How do I get the duration/working count of the bar (sample 2)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/26/2001",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Def(3/*exBarCaption*/,"<%=%258%>w"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Def(44/*exBarExtraCaption*/,"<%=%513%>d"); com_Bar.Def(45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(16)); COM::createFromVariant(exg2antt1.Columns().Add("Task")).Width(48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/12/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/15/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1963 |
How do I get the duration/working count of the bar (sample 1)
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,196); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); COM::createFromVariant(exg2antt1.Columns().Add("Task")).Width(48); COM::createFromVariant(exg2antt1.Columns().Add("Duration")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); COM::createFromVariant(exg2antt1.Columns().Add("Working")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(258)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/12/2002",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/15/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,196); } */ |
1962 |
How can I draw a solid frame around the the focusing item
public void init() { COM com_Appearance,com_Column,com_Items; anytype var_Appearance,var_Column,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.DefaultItemHeight(20); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.RenderType(-1); var_s = "gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wHI"; var_s = var_s + "URRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJTU"; var_s = var_s + "LDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLRE"; var_s = var_s + "E8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4E"; var_s = var_s + "oFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA="; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); exg2antt1.ShowFocusRect(true); exg2antt1.Background(19/*exShowFocusRect*/,0x1000000); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,1); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("P1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,1); } */ |
1961 |
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)
public void init() { COM com_Appearance,com_Column,com_Items; anytype var_Appearance,var_Column,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.DefaultItemHeight(20); exg2antt1.ShowFocusRect(true); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.RenderType(-1); var_s = "gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzVA"; var_s = var_s + "cRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+V"; var_s = var_s + "LQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTRW"; var_s = var_s + "jOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGgT"; var_s = var_s + "gWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg="; com_Appearance.Add(2,COMVariant::createFromStr(var_s)); com_Appearance.Add(3,"CP:2 -3 0 3 0"); exg2antt1.Background(19/*exShowFocusRect*/,0x3010101); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,1); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("P1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,1); } */ |
1960 |
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)
public void init() { COM com_Appearance,com_Column,com_Items; anytype var_Appearance,var_Column,var_Items; int h; str var_s,var_s1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.ShowFocusRect(true); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASVA"; var_s = var_s + "ceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrEJ"; var_s = var_s + "7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo7"; var_s = var_s + "GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DYB"; var_s = var_s + "g/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQOC"; var_s = var_s + "OXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoRo"; var_s = var_s + "NiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtAs"; var_s = var_s + "MpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJwN"; var_s = var_s + "kKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQf"; var_s = var_s + "Q0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6AO"; var_s = var_s + "BEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA=="; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); var_s1 = "gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQHI"; var_s1 = var_s1 + "MRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSWJ"; var_s1 = var_s1 + "ajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw1"; var_s1 = var_s1 + "COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHKU"; var_s1 = var_s1 + "ggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4JE"; var_s1 = var_s1 + "YVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+TZ"; var_s1 = var_s1 + "DHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA="; com_Appearance.Add(2,COMVariant::createFromStr(var_s1)); com_Appearance.Add(3,"CP:2 -2 0 2 0"); exg2antt1.SelBackColor(0x1000000); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,1); exg2antt1.Background(19/*exShowFocusRect*/,0x3ff0000); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("P1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,1); } */ |
1959 |
How can I display the start/end margins of bars, when cursor hovers it like a tooltip
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("exBarToolTip"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(6/*exBarToolTip*/,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Bar.Def"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Bar.Def"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); h = com_Items.AddItem("Items.ItemBar"); com_Items.AddBar(h,"Unknown",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"K"); com_Items.ItemBar(h,"K",6/*exBarToolTip*/,"Start:<%=%1%><br>End:<%=%2%>"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1958 |
Is it possible to define different kinds of summary bars with using the EBN files
public void init() { COM com_Appearance,com_Bar,com_Bar1,com_Chart,com_Items; anytype var_Appearance,var_Bar,var_Bar1,var_Chart,var_Items; int hSummaryJ,hSummaryK,hSummaryZ,hTaskJ,hTaskK,hTaskZ; str var_s,var_s1; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.RenderType(-16777216); var_s = "gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI"; var_s = var_s + "ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S"; var_s = var_s + "TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF"; var_s = var_s + "HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX"; var_s = var_s + "QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); var_s1 = "gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh"; var_s1 = var_s1 + "+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa"; var_s1 = var_s1 + "ZACj4arKejrRDCMAggI="; com_Appearance.Add(2,COMVariant::createFromStr(var_s1)); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Color(WinApi::RGB2int(1,0,0)); var_Bar1 = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar1 = var_Bar1; com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar1.Color(0x2000000); var_Items = exg2antt1.Items(); com_Items = var_Items; hSummaryJ = com_Items.AddItem("Summary A"); com_Items.AddBar(hSummaryJ,"Summary",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),"J"); hTaskJ = com_Items.InsertItem(hSummaryJ,,"Task A.1"); com_Items.AddBar(hTaskJ,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"J1"); hTaskJ = com_Items.InsertItem(hSummaryJ,,"Task A.2"); com_Items.AddBar(hTaskJ,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"J2"); com_Items.DefineSummaryBars(hSummaryJ,"J",-1,"<*>"); hSummaryK = com_Items.AddItem("Summary B"); com_Items.AddBar(hSummaryK,"Summary",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),"K"); hTaskK = com_Items.InsertItem(hSummaryK,,"Task B.1"); com_Items.AddBar(hTaskK,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); hTaskK = com_Items.InsertItem(hSummaryK,,"Task B.2"); com_Items.AddBar(hTaskK,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.DefineSummaryBars(hSummaryK,"K",-1,"<*>"); com_Items.ItemBar(0,"<K*>",33/*exBarColor*/,COMVariant::createFromInt(255)); hSummaryZ = com_Items.AddItem("Summary B"); com_Items.AddBar(hSummaryZ,"Summary",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),"Z"); hTaskZ = com_Items.InsertItem(hSummaryZ,,"Task B.1"); com_Items.AddBar(hTaskZ,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"Z1"); hTaskZ = com_Items.InsertItem(hSummaryZ,,"Task B.2"); com_Items.AddBar(hTaskZ,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"Z2"); com_Items.DefineSummaryBars(hSummaryZ,"Z",-1,"<*>"); com_Items.ItemBar(hSummaryZ,"Z",33/*exBarColor*/,COMVariant::createFromInt(16842496)); com_Items.ItemBar(0,"<Z1>",33/*exBarColor*/,COMVariant::createFromInt(50266112)); com_Items.ItemBar(0,"<Z2>",33/*exBarColor*/,COMVariant::createFromInt(33554176)); com_Items.ExpandItem(0,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1957 |
How can I display the week-number in ISO8601 format
|
1956 |
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption
public void init() { COM com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize(true); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.DrawGridLines(2/*exVLines*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Left")); com_Column = var_Column; com_Column.AllowSizing(false); com_Column.Width(96); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.FormatColumn("0 pos `A-Z`"); var_Column1 = COM::createFromVariant(com_Columns.Add("Center")); com_Column1 = var_Column1; com_Column1.HeaderAlignment(1/*CenterAlignment*/); com_Column1.Alignment(com_Column1.HeaderAlignment()); com_Column1.AllowSizing(false); com_Column1.Width(96); com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.FormatColumn("0 pos `A-Z`"); var_Column2 = COM::createFromVariant(com_Columns.Add("Right")); com_Column2 = var_Column2; com_Column2.HeaderAlignment(2/*RightAlignment*/); com_Column2.Alignment(com_Column2.HeaderAlignment()); com_Column2.AllowSizing(false); com_Column2.Width(96); com_Column2.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column2.FormatColumn("0 pos `A-Z`"); com_Column2.Def(34/*exCellDrawPartsOrder*/,"caption,check,icon,icons,picture"); com_Columns.Add(""); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellState(com_Items.AddItem("Item 1"),COMVariant::createFromInt(3),1); com_Items.CellState(com_Items.AddItem("Item 2"),COMVariant::createFromInt(2),1); com_Items.CellState(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1955 |
Can I display the column's multiple-lines caption vertically oriented (method 2)
public void init() { COM com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(48); exg2antt1.ColumnAutoResize(true); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("And others ..."); var_Column = COM::createFromVariant(com_Columns.Add("")); com_Column = var_Column; com_Column.HTMLCaption("First Column"); com_Column.HeaderVertical(true); com_Column.Width(36); com_Column.AllowSizing(false); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(8)); com_Column.Position(0); var_Column1 = COM::createFromVariant(com_Columns.Add("")); com_Column1 = var_Column1; com_Column1.HTMLCaption("<c><b>Second Column"); com_Column1.HeaderVertical(true); com_Column1.Width(36); com_Column1.AllowSizing(false); com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(8)); com_Column1.Position(1); var_Column2 = COM::createFromVariant(com_Columns.Add("")); com_Column2 = var_Column2; com_Column2.HTMLCaption("<r>Third Column"); com_Column2.HeaderVertical(true); com_Column2.Width(36); com_Column2.AllowSizing(false); com_Column2.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column2.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(8)); com_Column2.Position(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellState(com_Items.AddItem("Item 1"),COMVariant::createFromInt(3),1); com_Items.CellState(com_Items.AddItem("Item 2"),COMVariant::createFromInt(2),1); com_Items.CellState(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1954 |
Can I display the column's multiple-lines caption vertically oriented (method 1)
public void init() { COM com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(48); exg2antt1.HeaderSingleLine(false); exg2antt1.ColumnAutoResize(true); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("And others ..."); var_Column = COM::createFromVariant(com_Columns.Add("First Column")); com_Column = var_Column; com_Column.HeaderVertical(true); com_Column.Width(36); com_Column.AllowSizing(false); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(8)); com_Column.Position(0); var_Column1 = COM::createFromVariant(com_Columns.Add("Second Column")); com_Column1 = var_Column1; com_Column1.HeaderBold(true); com_Column1.HeaderVertical(true); com_Column1.Width(36); com_Column1.AllowSizing(false); com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(8)); com_Column1.Position(1); var_Column2 = COM::createFromVariant(com_Columns.Add("Third Column")); com_Column2 = var_Column2; com_Column2.HeaderVertical(true); com_Column2.Width(36); com_Column2.AllowSizing(false); com_Column2.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column2.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(8)); com_Column2.Position(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellState(com_Items.AddItem("Item 1"),COMVariant::createFromInt(3),1); com_Items.CellState(com_Items.AddItem("Item 2"),COMVariant::createFromInt(2),1); com_Items.CellState(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1953 |
Can I display the column's caption vertically oriented (method 2)
public void init() { COM com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(48); exg2antt1.ColumnAutoResize(true); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("And others ..."); var_Column = COM::createFromVariant(com_Columns.Add("")); com_Column = var_Column; com_Column.HTMLCaption("First"); com_Column.HeaderVertical(true); com_Column.Width(20); com_Column.AllowSizing(false); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Position(0); var_Column1 = COM::createFromVariant(com_Columns.Add("")); com_Column1 = var_Column1; com_Column1.HTMLCaption("<c><b>Second"); com_Column1.HeaderVertical(true); com_Column1.Width(20); com_Column1.AllowSizing(false); com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.Position(1); var_Column2 = COM::createFromVariant(com_Columns.Add("")); com_Column2 = var_Column2; com_Column2.HTMLCaption("<r>Third"); com_Column2.HeaderVertical(true); com_Column2.Width(20); com_Column2.AllowSizing(false); com_Column2.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column2.Position(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellState(com_Items.AddItem("Item 1"),COMVariant::createFromInt(3),1); com_Items.CellState(com_Items.AddItem("Item 2"),COMVariant::createFromInt(2),1); com_Items.CellState(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1952 |
Can I display the column's caption vertically oriented (method 1)
public void init() { COM com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(48); exg2antt1.ColumnAutoResize(true); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("And others ..."); var_Column = COM::createFromVariant(com_Columns.Add("First")); com_Column = var_Column; com_Column.HeaderVertical(true); com_Column.Width(20); com_Column.AllowSizing(false); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Position(0); var_Column1 = COM::createFromVariant(com_Columns.Add("Second")); com_Column1 = var_Column1; com_Column1.HeaderBold(true); com_Column1.HeaderVertical(true); com_Column1.Width(20); com_Column1.AllowSizing(false); com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.Position(1); var_Column2 = COM::createFromVariant(com_Columns.Add("Third")); com_Column2 = var_Column2; com_Column2.HeaderVertical(true); com_Column2.Width(20); com_Column2.AllowSizing(false); com_Column2.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column2.Position(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellState(com_Items.AddItem("Item 1"),COMVariant::createFromInt(3),1); com_Items.CellState(com_Items.AddItem("Item 2"),COMVariant::createFromInt(2),1); com_Items.CellState(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1951 |
How can I resize all task-bars 0-length
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/3/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/5/2017",213))); com_Items.ItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.ItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",513/*exBarDuration*/,"value + 1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1950 |
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
public void init() { COM com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Chart,var_Column,var_ConditionalFormat,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Duration")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); com_Column.Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%1 = 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190)); com_ConditionalFormat.ChartBackColor(com_ConditionalFormat.BackColor()); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/3/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/5/2017",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1949 |
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/3/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/5/2017",213))); com_Items.ItemBarEx("itembar(513) = 0",3/*exBarCaption*/,"`zero-length`"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1948 |
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/3/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/5/2017",213))); com_Items.ItemBarEx("itembar(513) = 0",53/*exBarBackgroundExt*/,"`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`"); com_Items.ItemBarEx("itembar(513) = 0",55/*exBarBackgroundExtInflate*/,"`-4,-4,4,4`"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1947 |
How can I find how many tasks/bars of 0-length (zero,empty) do I have
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/3/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/5/2017",213))); print( com_Items.ItemBarEx("itembar(513) = 0",256/*exBarsCount*/) ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1946 |
How can I remove all bars from selected items
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.SelBackColor(WinApi::RGB2int(240,240,240)); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); com_Bar.OverlaidGroup("Task,Task-Diff"); com_Bar.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","Task-Diff"); com_Bar1 = var_Bar1; com_Bar1.Height(4); com_Bar1.Color(WinApi::RGB2int(255,0,0)); com_Bar1.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.SelectItem(h,true); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213)),""); com_Items.AddBar(h,"Task-Diff",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/14/2017",213)),"P"); com_Items.SelectItem(h,true); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); print( "Bars before remove: " ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); com_Items.ItemBarEx("itemisselected",9/*exBarKey*/,"`toberemove` + value "); com_Items.RemoveBar(0,"<toberemove*>"); print( "Bars after remove: " ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1945 |
How can I remove task bars from selected items
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.SelBackColor(WinApi::RGB2int(240,240,240)); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); com_Bar.OverlaidGroup("Task,Task-Diff"); com_Bar.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","Task-Diff"); com_Bar1 = var_Bar1; com_Bar1.Height(4); com_Bar1.Color(WinApi::RGB2int(255,0,0)); com_Bar1.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.SelectItem(h,true); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213)),""); com_Items.AddBar(h,"Task-Diff",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/14/2017",213)),"P"); com_Items.SelectItem(h,true); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); print( "Bars before remove: " ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); com_Items.ItemBarEx("itemisselected and itembar(0) = `Task`",9/*exBarKey*/,"`toberemove` + value "); com_Items.RemoveBar(0,"<toberemove*>"); print( "Bars after remove: " ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1944 |
How can I change the pattern for some bars only
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); COM::createFromVariant(exg2antt1.Columns().Add("Tasks")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.CellState(h,COMVariant::createFromInt(0),1); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.CellState(h,COMVariant::createFromInt(0),1); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx("cellstate(0)",42/*exBarPattern*/,COMVariant::createFromInt(6)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1943 |
How do I apply the same effort to all bars
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(6/*exPatternBDiagonal*/); com_Bar.HistogramType(1/*exHistOverAllocation*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),21/*exBarEffort*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1942 |
How do I apply the same percent to all bars
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task%Progress"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Def(14/*exBarShowPercentCaption*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),12/*exBarPercent*/,COMVariant::createFromReal(0.5)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1941 |
How can I set the same duration for all bars
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),513/*exBarDuration*/,COMVariant::createFromInt(4)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1940 |
How do I move all bars to end at the same date-time
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),545/*exBarMoveEnd*/,"#8/15/2017#"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1939 |
How do I move all bars to start at the same date-time
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),544/*exBarMoveStart*/,"#8/2/2017#"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1938 |
How do I apply a new color for some bars, while others should be shown with a different color
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.SelBackColor(WinApi::RGB2int(240,240,240)); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); com_Bar.OverlaidGroup("Task,Task-Diff"); com_Bar.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","Task-Diff"); com_Bar1 = var_Bar1; com_Bar1.Height(4); com_Bar1.Color(WinApi::RGB2int(255,0,0)); com_Bar1.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213)),""); com_Items.AddBar(h,"Task-Diff",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/14/2017",213)),"P"); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),33/*exBarColor*/,"cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1937 |
How do I hide some bars, and show others
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.SelBackColor(WinApi::RGB2int(240,240,240)); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); com_Bar.OverlaidGroup("Task,Task-Diff"); com_Bar.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Task","Task-Diff"); com_Bar1 = var_Bar1; com_Bar1.Height(4); com_Bar1.Color(WinApi::RGB2int(255,0,0)); com_Bar1.Def(3/*exBarCaption*/,"<font ;6><%=%0%>"); com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.SelectItem(h,true); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213)),""); com_Items.AddBar(h,"Task-Diff",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/14/2017",213)),"P"); com_Items.SelectItem(h,true); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); com_Items.ItemBarEx("-1",19/*exBarTransparent*/,"itembar(0) = `Task` ? 0 : 100"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1936 |
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/6/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/9/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/13/2017",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("8/5/2017",213)),COMVariant::createFromDate(str2Date("8/16/2017",213))); print( "Bars before remove: " ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); com_Items.ItemBarEx("cellcaption(0) like `*2 *3`",9/*exBarKey*/,"`toberemove` + value "); com_Items.RemoveBar(0,"<toberemove*>"); print( "Bars after remove: " ); print( com_Items.ItemBar(0,"<*>",256/*exBarsCount*/) ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1935 |
Is it possible to automatically color the bar being checked
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; } public void init() { COM com_Chart,com_Column,com_ConditionalFormat,com_Items; anytype var_Chart,var_Column,var_ConditionalFormat,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackMode(1/*exTransparent*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2017",213))); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0","check"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.ApplyToBars("Task"); com_ConditionalFormat.BarColor(WinApi::RGB2int(0,0,1)); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Width(256); COM::createFromVariant(exg2antt1.Columns().Add(exg2antt1.ConditionalFormats().Item("check").Expression())).FormatColumn(exg2antt1.ConditionalFormats().Item("check").Expression()); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2017",213)),COMVariant::createFromDate(str2Date("1/12/2017",213))); h = com_Items.AddItem("Item 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2017",213)),COMVariant::createFromDate(str2Date("1/13/2017",213))); com_Items.CellState(h,COMVariant::createFromInt(0),1); h = com_Items.AddItem("Item 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2017",213)),COMVariant::createFromDate(str2Date("1/14/2017",213))); com_Items.CellState(h,COMVariant::createFromInt(0),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1934 |
How do I automatically bold items being checked
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; } public void init() { COM com_ConditionalFormat,com_Items; anytype var_ConditionalFormat,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackMode(1/*exTransparent*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%CS0","check"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); COM::createFromVariant(exg2antt1.Columns().Add("Items")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); COM::createFromVariant(exg2antt1.Columns().Add(exg2antt1.ConditionalFormats().Item("check").Expression())).FormatColumn(exg2antt1.ConditionalFormats().Item("check").Expression()); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item 1"); com_Items.CellState(com_Items.AddItem("Item 2"),COMVariant::createFromInt(0),1); com_Items.AddItem("Item 3"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1933 |
Can I display the radio-button with a solid color
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.RadioImage(0,32699122); exg2antt1.RadioImage(1,16777216); COM::createFromVariant(exg2antt1.Columns().Add("Check")).Def(1/*exCellHasRadioButton*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Radio 1"); com_Items.CellState(com_Items.AddItem("Radio 2"),COMVariant::createFromInt(0),1); com_Items.AddItem("Radio 1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1932 |
Can I display the check-box with a solid color
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.CheckImage(0/*Unchecked*/,32699122); exg2antt1.CheckImage(1/*Checked*/,16777216); COM::createFromVariant(exg2antt1.Columns().Add("Check")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Check 1"); com_Items.CellState(com_Items.AddItem("Check 2"),COMVariant::createFromInt(0),1); com_Items.AddItem("Check 3"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1931 |
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; } public void init() { COM com_Column,com_Column1,com_Items; anytype var_Column,var_Column1,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(4/*exGroupLinesInsideLeaf*/); exg2antt1.SelBackMode(1/*exTransparent*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Format")); com_Column1 = var_Column1; com_Column1.FormatColumn("%CS0"); com_Column1.Caption(com_Column1.FormatColumn()); com_Column1.Def(5/*exCellForeColor*/,COMVariant::createFromInt(8421504)); com_Column1.Def(8/*exHeaderForeColor*/,com_Column1.Def(5/*exCellForeColor*/)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Item 1"); com_Items.CellState(com_Items.InsertItem(h,,"Item 2"),COMVariant::createFromInt(0),1); com_Items.CellState(com_Items.InsertItem(h,,"Item 3"),COMVariant::createFromInt(0),1); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1930 |
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.Columns().Add("Items"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Format")); com_Column = var_Column; com_Column.FormatColumn("%CD0"); com_Column.Caption(com_Column.FormatColumn()); com_Column.Def(5/*exCellForeColor*/,COMVariant::createFromInt(8421504)); com_Column.Def(8/*exHeaderForeColor*/,com_Column.Def(5/*exCellForeColor*/)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellData(com_Items.AddItem("Item 1"),COMVariant::createFromInt(0),COMVariant::createFromInt(1234)); com_Items.CellData(com_Items.AddItem("Item 2"),COMVariant::createFromInt(0),"this is just an user data"); com_Items.CellData(com_Items.AddItem("Item 3"),COMVariant::createFromInt(0),COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1929 |
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn
public void init() { COM com_Column,com_Column1,com_Column2,com_Editor,com_Items; anytype var_Column,var_Column1,var_Column2,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"Item 1"); com_Editor.AddItem(2,"Item 2"); com_Editor.AddItem(3,"Item 3"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Format")); com_Column1 = var_Column1; com_Column1.FormatColumn("%0"); com_Column1.Caption(com_Column1.FormatColumn()); com_Column1.Def(5/*exCellForeColor*/,COMVariant::createFromInt(8421504)); com_Column1.Def(8/*exHeaderForeColor*/,com_Column1.Def(5/*exCellForeColor*/)); com_Column1.AllowSizing(false); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Format")); com_Column2 = var_Column2; com_Column2.FormatColumn("%C0"); com_Column2.Caption(com_Column2.FormatColumn()); com_Column2.Def(5/*exCellForeColor*/,COMVariant::createFromInt(8421504)); com_Column2.Def(8/*exHeaderForeColor*/,com_Column2.Def(5/*exCellForeColor*/)); com_Column2.AllowSizing(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(0),COMVariant::createFromInt(2)); com_Items.AddItem(COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1928 |
How can I use the ShowNonworkingHours property (hide the non-working hours)
public void init() { COM com_Chart; anytype var_Chart; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.UnitScale(65536/*exHour*/); com_Chart.NonworkingHours(16253183); com_Chart.ShowNonworkingHours(false); com_Chart.ShowNonworkingUnits(false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1927 |
How can I use the ShowNonworkingDates property (hide the non-working days)
public void init() { COM com_Chart; anytype var_Chart; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); com_Chart.ShowNonworkingDates(false); com_Chart.ShowNonworkingUnits(false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1926 |
How can I show/hide bars once the user checks or un-checks a column
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBarEx(COMVariant::createFromBoolean(true),19/*exBarTransparent*/,"cellstate(0) = 1 ? 0 : 100"); } public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),19/*exBarTransparent*/,"cellstate(0) = 1 ? 0 : 100"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1925 |
How can I change the color for all Task bars
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("itembar(0) = `Task`",33/*exBarColor*/,COMVariant::createFromInt(65280)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1924 |
Is it possible to automatically select bars only when user selects a new item
// SelectionChanged event - Fired after a new item has been selected. void onEvent_SelectionChanged() { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBarEx(COMVariant::createFromBoolean(true),257/*exBarSelected*/,"itemisselected"); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Columns().Add("Tasks"); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowSelectObjects(0/*exNoSelectObjects*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1923 |
Is it possible to automatically select bars only when the user clicks the column's checkbox
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBarEx(COMVariant::createFromBoolean(true),257/*exBarSelected*/,"cellstate(0) = 1"); } public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowSelectObjects(0/*exNoSelectObjects*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1922 |
How do I select all bars on leaf items
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("itemlevel = 1",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1921 |
How can I change the caption for all checked Task bars
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("(cellstate(0) = 1) and (itembar(0) = `Task`)",3/*exBarCaption*/,"`new caption`"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1920 |
How can I change the caption for all Task bars
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("(itembar(0) = `Task`)",3/*exBarCaption*/,"`new caption`"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1919 |
How can I change the caption for all bars
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),3/*exBarCaption*/,"`new caption`"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1918 |
How can I move all Task bars to end at the same date time
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("(itembar(0) = `Task`)",514/*exBarMove*/,"#8/14/2017# - itembar(2)"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1917 |
How can I move all Task bars to start at the same date time
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("(itembar(0) = `Task`)",514/*exBarMove*/,"#8/3/2017# - itembar(1)"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1916 |
How can I change the color for checked Task bars
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",33/*exBarColor*/,COMVariant::createFromInt(255)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1915 |
How do I resize all Task bars programatically
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("itembar(0) = `Task`",2/*exBarEnd*/,"value + 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1914 |
How do I move just the checked Task bars in the chart
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",514/*exBarMove*/,COMVariant::createFromInt(-2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1913 |
How do I move all Task bars in the chart
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("itembar(0) = `Task`",514/*exBarMove*/,COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1912 |
How do I count all Task bars in the chart
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Columns().Add("Tasks"); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); print( com_Items.ItemBarEx("itembar(0) = `Task`",256/*exBarsCount*/) ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1911 |
How do I select bars whose items are checked
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Tasks")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); exg2antt1.HeaderVisible(1/*exHeaderVisibleExtendLevels*/); exg2antt1.SelBackColor(WinApi::RGB2int(240,240,240)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/1/2017",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Summary"); com_Bar = var_Bar; com_Bar.StartShape(0/*exShapeIconEmpty*/); com_Bar.EndShape(0/*exShapeIconEmpty*/); com_Bar.Shape(20/*exShapeThinDown*/); com_Chart.SelBackColor(exg2antt1.SelBackColor()); com_Chart.SelBarColor(WinApi::RGB2int(128,128,128)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/2/2017",213)),COMVariant::createFromDate(str2Date("8/8/2017",213))); com_Items.SelectItem(hChild,true); hChild = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/3/2017",213)),COMVariant::createFromDate(str2Date("8/10/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); hChild = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("8/4/2017",213)),COMVariant::createFromDate(str2Date("8/12/2017",213))); com_Items.CellState(hChild,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("8/1/2017",213)),COMVariant::createFromDate(str2Date("8/1/2017",213)),"sum"); com_Items.DefineSummaryBars(h,"sum",-3,""); com_Items.ExpandItem(h,true); com_Items.ItemBarEx("cellstate(0) = 1",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1910 |
How can I select all bars, where a specified column matches a specified criteria
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,48); exg2antt1.Chart().SelBarColor(WinApi::RGB2int(255,0,0)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2","K2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"P","P"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"Q","Q"); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"M","M"); com_Items.ItemBarEx("cellcaption(0) = `Task 1`",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1909 |
How can I select/unselect all bars
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,48); exg2antt1.Chart().SelBarColor(WinApi::RGB2int(255,0,0)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","K1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2","K2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"P","P"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"Q","Q"); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"M","M"); com_Items.ItemBarEx(COMVariant::createFromBoolean(true),257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1908 |
Is it possible to set the background color of the chart for one item and one day
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Items"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item"); h = com_Items.AddItem("Item"); com_Items.AddBar(h,"",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/3/2001",213)),"Back"," "); com_Items.ItemBar(h,"Back",7/*exBarBackColor*/,COMVariant::createFromInt(255)); com_Items.ItemBar(h,"Back",29/*exBarSelectable*/,COMVariant::createFromBoolean(false)); com_Items.AddItem("Item"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1907 |
It is possible to search for an item ( inside the Editor ), case insensitive
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("DropDownList")).Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"One"); com_Editor.AddItem(2,"Two"); com_Editor.AddItem(3,"Three"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(exg2antt1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(">ONE")); com_Items.AddItem(exg2antt1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(">ThRee")); com_Items.AddItem(exg2antt1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem("ONE")); com_Items.AddItem(exg2antt1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(">tWo")); exg2antt1.EndUpdate(); } |
1906 |
The text after the BR-tag is in same line as the text before the BR-tag (entire column)
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(1/*exHLines*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Default")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("This is the first line.<br>This is the second line."); com_Items.AddItem("This is the first line.<br>This is the second line."); com_Items.AddItem("This is the first line.<br>This is the second line."); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1905 |
The text after the BR-tag is in same line as the text before the BR-tag (individual)
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(1/*exHLines*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValueFormat(com_Items.AddItem("This is the first line.<br>This is the second line."),COMVariant::createFromInt(0),1/*exHTML*/); h = com_Items.AddItem("<b>This is the first line.<br>This is the second line.</b>"); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); com_Items.CellSingleLine(h,COMVariant::createFromInt(0),false); com_Items.CellValueFormat(com_Items.AddItem("This is the first line.<br>This is the second line."),COMVariant::createFromInt(0),1/*exHTML*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1904 |
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-1/*exAllLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.BackColorAlternate(0x7ff0f0f0); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/13/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 4"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/13/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 5"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1903 |
Can I disable an item once the user selects a new value into a different item
// Change event - Occurs when the user changes the cell's content. void onEvent_Change(int _Item,int _ColIndex,COMVariant /*variant*/ _NewValue) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.EnableItem(com_Items.ItemByIndex(1),_NewValue); } public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; int h1,h2; ; super(); exg2antt1.FreezeEvents(true); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.Columns().Add("Q"); exg2antt1.Columns().Add("A"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("What's your gender?"); var_Editor = com_Items.CellEditor(h1,COMVariant::createFromInt(1)); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"Male"); com_Editor.AddItem(0,"Female"); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(1)); h2 = com_Items.AddItem("What's pet name?"); com_Items.CellValue(h2,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces"); com_Items.CellSingleLine(h2,COMVariant::createFromInt(1),false); exg2antt1.EndUpdate(); exg2antt1.FreezeEvents(false); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1902 |
How can I get a row expanded / enlarged to fit the cell's text (entire column)
public void init() { COM com_Column,com_Editor,com_Items; anytype var_Column,var_Editor,var_Items; int h1,h2; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.Columns().Add("Q"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("A")); com_Column = var_Column; com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(5/*MemoType*/); com_Editor.Appearance(8/*SingleApp*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("What's name?"); com_Items.CellValue(h1,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces"); h2 = com_Items.AddItem("What's your pet name?"); com_Items.CellValue(h2,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1901 |
How can I get a row expanded / enlarged to fit the cell's text (individual cell)
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; int h1,h2; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.Columns().Add("Q"); exg2antt1.Columns().Add("A"); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("What's name?"); com_Items.CellValue(h1,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces"); h2 = com_Items.AddItem("What's your pet name?"); var_Editor = com_Items.CellEditor(h2,COMVariant::createFromInt(1)); com_Editor = var_Editor; com_Editor.EditType(5/*MemoType*/); com_Editor.Appearance(8/*SingleApp*/); com_Items.CellValue(h2,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces"); com_Items.CellSingleLine(h2,COMVariant::createFromInt(1),false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |